<!--
  * 通知  表单
  * 
  * @Author:    1024创新实验室-主任：卓大 
  * @Date:      2022-08-21 19:52:43 
  * @Wechat:    zhuda1024 
  * @Email:     lab1024@163.com 
  * @Copyright  1024创新实验室 （ https://1024lab.net ），Since 2012 
-->
<template>
      <a-form ref="formRef" :model="formData" :rules="formRules" :label-col="{ span: 3 }" :wrapper-col="{ span: 20 }">
        <a-form-item label="文号">
          <a-input v-model:value="formData.documentNumber" placeholder="文号，如：1024创新实验室发〔2022〕字第36号" />
        </a-form-item>
        <a-form-item label="作者" name="author">
          <a-input v-model:value="formData.author" placeholder="请输入作者" />
        </a-form-item>
        <a-form-item label="来源" name="source">
          <a-input v-model:value="formData.source" placeholder="请输入来源" />
        </a-form-item>
      </a-form>
  </template>
  
  <script setup>
    import { reactive, ref, onMounted, watch, computed, nextTick } from 'vue';
  
    const defaultFormData = {
      noticeId: undefined,
      noticeTypeId: undefined,
      title: undefined, // 标题
      categoryId: undefined, // 分类
      source: undefined, // 来源
      documentNumber: undefined, // 文号
      author: undefined, // 作者
      allVisibleFlag: 1, // 是否全部可见
      visibleRangeList: [], // 可见范围
      scheduledPublishFlag: false, // 是否定时发布
      publishTime: undefined, // 发布时间
      attachment: [], // 附件
      contentHtml: '', // html内容
      contentText: '', // 纯文本内容
    };
  
    const formData = reactive({ ...defaultFormData });
  
    const formRules = {
      title: [{ required: true, message: '请输入' }],
      noticeTypeId: [{ required: true, message: '请选择分类' }],
      allVisibleFlag: [{ required: true, message: '请选择' }],
      source: [{ required: true, message: '请输入来源' }],
      author: [{ required: true, message: '请输入作者' }],
      contentHtml: [{ required: true, message: '请输入内容' }],
    };
  
    
  </script>
  
  <style lang="less" scoped>
    .visible-list {
      display: flex;
      flex-wrap: wrap;
      .visible-item {
        padding-top: 8px;
      }
    }
  </style>
  